package com.demo.springboot.resttemplate.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;

@Configuration
@Data
public class PropertyConfig implements Serializable {

    /**
     * 书籍id
     */
    @Value("${book.id}")
    private int bookId;

    /**
     * 书名
     */
    @Value("${book.name}")
    private String bookName;

    /**
     * 学生姓名
     */
    @Value("${student.name}")
    private String studentName;

    /**
     * 年龄
     */
    @Value("${student.age}")
    private int age;

    /**
     * user-center address
     */
    @Value("${user.server}")
    private String userServer;

    /**
     * user-center token
     */
    @Value("${user.token}")
    private String userToken;

    @Value("${url.addUserByForm}")
    private String urlAddUserByForm;

    @Value("${url.isValidToken}")
    private String urlIsValidToken;

    /**
     * login url
     */
    @Value("${url.login}")
    private String urlLogin;

    /**
     * logout url
     */
    @Value("${url.logout}")
    private String urlLogout;

    /**
     * change password url
     */
    @Value("${url.changePassword}")
    private String urlChangePassword;

    /**
     * register url
     */
    @Value("${url.register}")
    private String urlRegister;

    /**
     * delete-user url
     */
    @Value("${url.deleteUser}")
    private String urlDeleteUser;

    /**
     * 虎符主机
     */
    @Value("${hufu.host}")
    private String hufuHost;

    /**
     * 虎符clientId
     */
    @Value("${hufu.clientId}")
    private String hufuClientId;

    /**
     * 虎符秘钥
     */
    @Value("${hufu.clientSecret}")
    private String hufuClientSecret;

    /**
     * 获取访问令牌url
     */
    @Value("${hufu.url.getToken}")
    private String hufuUrlGetToken;

    /**
     * 新增/更新用户url
     */
    @Value("${hufu.url.userSave}")
    private String hufuUrlUserSave;

    /**
     * 删除用户url
     */
    @Value("${hufu.url.userDelete}")
    private String hufuUrlUserDelete;

    /**
     * 获取用户url
     */
    @Value("${hufu.url.userGet}")
    private String hufuUrlUserGet;
}
